path = 'write.txt'
import numpy as np
from tqdm import tqdm


#检测patent-100k 是否都在patent-240k里面
path1 = 'F:\\LCW\\PycharmProject\\pytorch-learn\\RecSys\\dataset\\negSample\\patent-240k.txt'
path2 = 'F:\\LCW\\PycharmProject\\pytorch-learn\\RecSys\\dataset\\patent-100k\\write.txt'


with open(path1,'r') as f:
    data1 = f.readlines()
    data1_list = []
    for line in tqdm(data1):
        data1_list.append(line)


with open(path2,'r') as g:
    data2 = g.readlines()
    error_count = 0
    suc_count = 0
    for line in tqdm(data2):
        if line not in data1_list:
            error_count += 1
        if line in data1_list:
            print(line)
            suc_count+=1
    print(error_count)
    print(suc_count)

